From: Juergen Gross Date: Wed, 23 Aug 2017 17:34:00 +0000 (+0200) Subject: xen/common/memory.c: let custom parameter parsing routines return errno X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1579 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7471d395d98ba2e149072f74110303db72f2a7db;p=xen.git xen/common/memory.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/common/memory.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/common/memory.c b/xen/common/memory.c index b2066db07e..26da6050f6 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -55,7 +55,8 @@ static unsigned int __read_mostly hwdom_max_order = CONFIG_HWDOM_MAX_ORDER; #ifdef HAS_PASSTHROUGH static unsigned int __read_mostly ptdom_max_order = CONFIG_PTDOM_MAX_ORDER; #endif -static void __init parse_max_order(const char *s) + +static int __init parse_max_order(const char *s) { if ( *s != ',' ) domu_max_order = simple_strtoul(s, &s, 0); @@ -67,6 +68,8 @@ static void __init parse_max_order(const char *s) if ( *s == ',' && *++s != ',' ) ptdom_max_order = simple_strtoul(s, &s, 0); #endif + + return *s ? -EINVAL : 0; } custom_param("memop-max-order", parse_max_order);